<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>地图标记工具</title>
	<?php echo $this->Html->script(array(
			'http://api.map.baidu.com/api?v=2.0&ak='.Configure::read('Bmap.ak'),
			'jquery/jquery-1.8.2',
			'Bmap.BMap'
			));
	?>
</head>
<body style = 'margin:0'>
<div id="map_canvas" style="width:600px; height:300px"></div>
<script type="text/javascript">
  	$().ready(function(){
  		gtm.f.initialize();

  		var coord = jQuery(window.parent.document).find('#VenueMapPoint').val();
  		var add_address = jQuery(window.parent.document).find('#VenueWayAddress').val();

  	  	var check = add_address;
  		var search_str = add_address;
  		jQuery(window.parent.document).find('#mark_map_search').val(search_str);
  		
  		if(coord){
			var json ;
			eval("json="+coord); 
			gtm.p.coord = coord;
			gtm.f.setMark(json);
			gtm.f.setZoom(json.zoom);
  	  	}else if((check !='undefined') && check){
  	  	  	gtm.f.geocoding(search_str);
  	  	}else{
  	  	  	gtm.f.geocoding('中国 陕西 西安');
  	  	}
  	});

  	function getCurPoint(){
  		jQuery(window.parent.document).find('#VenueMapPoint').val(gtm.p.coord);
  	}
</script>
 
</body>
</html>
